import request from "@/utils/request";

// 创建招聘职位
export function createJob(data) {
  return request({
    url: "/member/job/admin/createJob",
    method: "post",
    data: data,
  });
}

// 更新招聘职位
export function updateJob(data) {
  return request({
    url: "/member/job/admin/editJob",
    method: "put",
    data: data,
  });
}

// 删除招聘职位
export function deleteJob(id) {
  return request({
    url: "/member/job/admin/delete?id=" + id,
    method: "delete",
  });
}

// 获得招聘职位
export function getJob(id) {
  return request({
    url: "/member/job/admin/jobDetail?id=" + id,
    method: "get",
  });
}

// 获得招聘职位分页
export function getJobPage(query) {
  return request({
    url: "/member/job/admin/checkJobList",
    method: "post",
    params: query,
  });
}

// 导出招聘职位 Excel
export function exportJobExcel(query) {
  return request({
    url: "/member/job/admin/export-excel",
    method: "post",
    params: query,
    responseType: "blob",
  });
}
